<%@page import="Model.Purchase.PurchaseList"%>
<%@page import="Model.Purchase.PurchaseListView"%>
<%@page import="RssEasy.Core.HttpRequestHelper"%>
<%@page import="RssEasy.DAL.Pagination"%>
<%@page import="qqt.area_list.AreaList"%>
<%@page import="java.awt.geom.Area"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%
    PurchaseListView purchase = new PurchaseListView(pageContext);
    purchase.request();
    purchase.curpage=Integer.parseInt(purchase.get("curpage"));
    if (!purchase.get("xianid").equals("")) {
        purchase.select().where("shijian>? and typid=? and state=? and shengid=? and shiid=? and xianid=? and name like '%" + purchase.get("name") + "%'",
                purchase.get("times"), "2", "1", purchase.get("shengid"), purchase.get("shiid"), purchase.get("xianid")).get_page_desc("id");
    }
    if (purchase.get("xianid").equals("") && !purchase.get("shiid").equals("")) {
        purchase.select().where("shijian>? and typid=? and state=? and shengid=? and shiid=? and name like '%" + purchase.get("name") + "%'",
                purchase.get("times"), "2", "1", purchase.get("shengid"), purchase.get("shiid")).get_page_desc("id");
    }
    if (purchase.get("xianid").equals("") && purchase.get("shiid").equals("") && !purchase.get("shengid").equals("")) {
        purchase.select().where("shijian>? and typid=? and state=? and shengid=? and name like '%" + purchase.get("name") + "%'",
                purchase.get("times"), "2", "1", purchase.get("shengid")).get_page_desc("id");
    }
    if (purchase.get("xianid").equals("") && purchase.get("shiid").equals("") && purchase.get("shengid").equals("")) {
        purchase.select().where("shijian>? and typid=? and state=? and name like '%" + purchase.get("name") + "%'",
                purchase.get("times"), "2", "1").get_page_desc("id");
    }
    out.print(purchase.toKeyValue(true));
%>

